package cn.wolfcode.crm.service.impl;

import cn.wolfcode.crm.domain.Loss;
import cn.wolfcode.crm.mapper.LossMapper;
import cn.wolfcode.crm.page.PageResult;
import cn.wolfcode.crm.query.LossQueryObject;
import cn.wolfcode.crm.query.QueryObject;
import cn.wolfcode.crm.service.ILossService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class LossServiceImpl implements ILossService {
    @Autowired
    private LossMapper lossMapper;
    @Override
    public PageResult query(LossQueryObject qo) {
        Integer  total=lossMapper.queryForCount(qo);
        List<Loss> rows = lossMapper.queryForList(qo);
        return new PageResult(total,rows);
    }
}
